Page({
  data: {
    questions: [
      {
        title: "这是第一题？",
        options: ["选项A", "选项B", "选项C", "选项D"],
        selectedOption: 0
      },
      {
        title: "这是第二题？",
        options: ["选项A", "选项B", "选项C", "选项D"],
        selectedOption: 1
      }
      // 更多题目...
    ],
    currentQuestionIndex: 0,
    currentQuestion: {}
  },

  onLoad: function() {
    this.setCurrentQuestion();
  },

  setCurrentQuestion: function() {
    const { questions, currentQuestionIndex } = this.data;
    this.setData({
      currentQuestion: questions[currentQuestionIndex]
    });
  },

  onRadioChange: function(e) {
    const index = e.detail.value;
    this.setData({
      'currentQuestion.selectedOption': index
    });
  },

  nextQuestion: function() {
    const { currentQuestionIndex, questions } = this.data;
    if (currentQuestionIndex < questions.length - 1) {
      this.setData({
        currentQuestionIndex: currentQuestionIndex + 1
      });
      this.setCurrentQuestion();
    } else {
      // 处理所有题目完成后的逻辑，例如显示结果
      wx.showToast({
        title: '已完成所有题目',
        icon: 'none'
      });
    }
  }
});